﻿// ParseLib - An open source library for natural language processing.
// Copyright (C) Kais Dukes, 2012. E-mail: kais@kaisdukes.com
// http://parselib.org

using System.Collections.Generic;
using ParseLib.Corpora;
using ParseLib.Tagging;

namespace ParseLib.Treebanks
{
    public abstract class DependencyTreebank : Corpus
    {
        public DependencyTagset DependencyTagset { get; protected set; }

        public int GraphCount
        {
            get { return TextualUnitCount; }
        }

        public SyntaxGraph GetGraph(int index)
        {
            return (SyntaxGraph) this[index];
        }

        public IEnumerable<SyntaxGraph> Graphs
        {
            get
            {
                for (var i = 0; i < TextualUnitCount; i++)
                {
                    yield return (SyntaxGraph) this[i];
                }
            }
        }
    }
}